﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Roles.aspx.cs"
    Inherits="Roles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <title>XmlProviders - Roles</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h2>
        Roles</h2>
    <fieldset>
        <legend>New Role</legend>
        <asp:TextBox ID="txtRoleName" runat="server" Width="200px"></asp:TextBox>
        <asp:Button ID="btnCreate" runat="server" CommandName="Create" OnCommand="HandleCommand"
            Text="Create" Width="88px"></asp:Button>
    </fieldset>
    <ul class="list">
        <asp:Repeater ID="rptRoles" runat="server">
            <AlternatingItemTemplate>
                <li class="alter">
                    <% if (this.User.Identity.IsAuthenticated) { %>
                    <span class="commands">
                        <asp:LinkButton runat="server" CommandName="Delete" CommandArgument='<%# Container.DataItem %>'
                            OnCommand="HandleCommand">Delete</asp:LinkButton>
                    </span>
                    <% } %>
                    <%# Container.DataItem %>
                </li>
            </AlternatingItemTemplate>
            <ItemTemplate>
                <li>
                    <% if (this.User.Identity.IsAuthenticated) { %>
                    <span class="commands">
                        <asp:LinkButton runat="server" CommandName="Delete" CommandArgument='<%# Container.DataItem %>'
                            OnCommand="HandleCommand">Delete</asp:LinkButton>
                    </span>
                    <% } %>
                    <%# Container.DataItem %>
                </li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
</asp:Content>
